<html>
<head><meta charset="utf-8"><title>lsp text document sync incremental · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/lsp.20text.20document.20sync.20incremental.html">lsp text document sync incremental</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="179057154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/lsp%20text%20document%20sync%20incremental/near/179057154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hoang Luu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/lsp.20text.20document.20sync.20incremental.html#179057154">(Oct 25 2019 at 15:00)</a>:</h4>
<p>Currently, RA only support document sync with Full mode</p>
<div class="codehilite"><pre><span></span>        text_document_sync: Some(TextDocumentSyncCapability::Options(TextDocumentSyncOptions {
            open_close: Some(true),
            change: Some(TextDocumentSyncKind::Full),
            will_save: None,
            will_save_wait_until: None,
            save: None,
        })),
</pre></div>


<p>Is it feasible to implement <code>SyncKind::Incremental</code>?</p>



<a name="179058695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/lsp%20text%20document%20sync%20incremental/near/179058695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/lsp.20text.20document.20sync.20incremental.html#179058695">(Oct 25 2019 at 15:15)</a>:</h4>
<p>Totally feasible, just not a high priority: full file sync seems to work<br>
rather fast anyway.</p>



<a name="240460332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/lsp%20text%20document%20sync%20incremental/near/240460332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/lsp.20text.20document.20sync.20incremental.html#240460332">(May 27 2021 at 12:40)</a>:</h4>
<p>This has been available for a while and I don't think we've had any recent issues with it. Should we remove the fallback option?</p>



<a name="240584005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/lsp%20text%20document%20sync%20incremental/near/240584005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/lsp.20text.20document.20sync.20incremental.html#240584005">(May 28 2021 at 09:59)</a>:</h4>
<p>Yeah, let's remove it.</p>



<a name="240584128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/lsp%20text%20document%20sync%20incremental/near/240584128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/lsp.20text.20document.20sync.20incremental.html#240584128">(May 28 2021 at 10:00)</a>:</h4>
<p>Might make sense to search existing issues with "incremental" -- I recall seeing some still-opende issue during the triage, but I might be misremembering</p>



<a name="240584310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/lsp%20text%20document%20sync%20incremental/near/240584310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/lsp.20text.20document.20sync.20incremental.html#240584310">(May 28 2021 at 10:02)</a>:</h4>
<p>There's a couple of them, but I'm not sure they're related to this: <a href="https://github.com/rust-analyzer/rust-analyzer/issues?q=is%3Aissue+is%3Aopen+incremental+sync">https://github.com/rust-analyzer/rust-analyzer/issues?q=is%3Aissue+is%3Aopen+incremental+sync</a></p>



<a name="240584513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/lsp%20text%20document%20sync%20incremental/near/240584513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/lsp.20text.20document.20sync.20incremental.html#240584513">(May 28 2021 at 10:04)</a>:</h4>
<p>At least not after <a href="https://github.com/rust-analyzer/rust-analyzer/pull/5659">https://github.com/rust-analyzer/rust-analyzer/pull/5659</a></p>



<a name="240584770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/lsp%20text%20document%20sync%20incremental/near/240584770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/lsp.20text.20document.20sync.20incremental.html#240584770">(May 28 2021 at 10:07)</a>:</h4>
<p>Hmm</p>



<a name="240584920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/lsp%20text%20document%20sync%20incremental/near/240584920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/lsp.20text.20document.20sync.20incremental.html#240584920">(May 28 2021 at 10:09)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/4829">https://github.com/rust-analyzer/rust-analyzer/issues/4829</a> doesn't look great</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>